<#import "/spring.ftl" as spring/>
<#import "/common/base.ftl" as base/>
<@base.page '财务采购退货明细'>
<div ng-controller="finacePurchaseReturnDetailController">
    <div class="row">
			  <div class="panel-body" >
			  <form class="form-inline">
			  	<div class="form-group">
					<label for="returnOrder">采购退货单号:&nbsp;&nbsp;</label>
					<input type="text" id="returnOrder" readonly="true" ng-model="returnOrder" class="form-control">
				</div>
			    <div class="form-group">
					<label for="supplierName">供应商名称:&nbsp;&nbsp;&nbsp;&nbsp;</label>
					<input type="text" id="supplierName" readonly="true" ng-model="supplierName" class="form-control">
				</div>
				<br> <br>
				<div class="form-group">
					<label for="warehouse">仓库:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
					<input type="text" id="warehouse" readonly="true" ng-model="warehouse" class="form-control">
				</div>
				<div class="form-group">
					<label for="planReturnTime">预计退货日期:</label>
					<input type="text" id="planReturnTime" readonly="true" ng-model="planReturnTime" class="form-control" style="width:200px">
				</div>
				<div class="form-group">
					<label for="actualReturnTime">实际退货日期:</label>
					<input type="text" id="actualReturnTime" readonly="true" ng-model="actualReturnTime" class="form-control" style="width:200px">
				</div>
				<br> <br>
				<div class="form-group">
					<label for="address">取货地址:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
					<input type="text" id="address" readonly="true" ng-model="address" class="form-control">
				</div>
				<div class="form-group">
					<label for="remark">备注:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
					<input type="text" id="remark" readonly="true" ng-model="remark" class="form-control" style="width:400px">
				</div>
				<br><br>
				<div class="form-group" style="float:right;">
					<label for="amount">退货总金额:</label>
					<input type="text" id="amount" readonly="true" ng-model="amount" class="form-control">
				</div>
				</form>
			  </div>
	</div>
	
	<div class="row">
		<div class="panel panel-default"  class="text-center">
			
			  <div class="panel-body-scroll" >
			  <table class="table table-hover">
			  			  <thead>
			  				<tr>
			  					<th class="text-center" style="width:5%">货号</th>
								<th class="text-center" style="width:6%">条码</th>
								<th class="text-center" style="width:10%">商品名称</th>
								<th class="text-center" style="width:3%">税率</th>
								<th class="text-center" style="width:5%">可用量</th>
								<th class="text-center" style="width:5%">周均销量</th>
								<th class="text-center" style="width:5%">在库成本价</th>
								<th class="text-center" style="width:5%">采购价</th>
								<th class="text-center" style="width:5%">退货价</th>

								<th class="text-center" style="width:5%">收货数量</th>
								<th class="text-center" style="width:5%">残次量</th>
								<th class="text-center" style="width:10%">采购日期</th>

								<th class="text-center" style="width:3%">退货数量</th>
								<th class="text-center" style="width:3%">金额小计</th>					
			  				</tr>
			  			  </thead>
			  			  <tbody>
							<tr ng-repeat="good in returnOrderList track by $index">
								<td class="text-center" style="vertical-align:middle;">{{good.sku}}</td>
								<td class="text-center" style="vertical-align:middle;">{{good.barcode}}</td>
								<td class="text-center" style="vertical-align:middle;" ">
									<a href="#" title={{good.goodsName}} style="color: #676a6c;">
									{{good.goodsName | cut:false:20:' ...'}}
									</a>
								</td>
								<td class="text-center" style="vertical-align:middle;">{{good.tax*100}}%</td>
								<td class="text-center" style="vertical-align:middle;">{{good.stock}}</td>
								<td class="text-center" style="vertical-align:middle;">{{good.averageWeeklySales}}</td>
								<td class="text-center" style="vertical-align:middle;">{{good.costPrice}}</td>
								<td class="text-center" style="vertical-align:middle;">{{good.recentPurchasePrice}}</td>
								<td class="text-center" style="vertical-align:middle;">{{good.returnPrice}}</td>

								<td class="text-center" style="vertical-align:middle;">{{good.deliveryQuantity}}</td>
								<td class="text-center" style="vertical-align:middle;">{{good.defectiveQuantity}}</td>								
								<td class="text-center" style="vertical-align:middle;">{{good.purchaseDate |date:'yyyy-MM-dd'}}</td>

								<td class="text-center" style="vertical-align:middle;">{{good.returnQuantity}}</td>
								<td class="text-center" style="vertical-align:middle;">{{good.returnAmount}}</td>
							</tr>
						  </tbody>
					</table>
			  </div>
		</div>
	</div>
	
	<div class="row">
		<table style="width:100%;">
			<tr>
				<td align="center">
					<button type="button" class="btn btn-primary" id="back" ng-click="back();">返回</button>
				</td>
			</tr>
		</table>
	</div>
</div>
<script src="<@spring.url '/assets/pagejs/purchaseReturnOrder/purchaseReturnOrder.js' />"></script>
</@base.page>
